php forum
php mysql forum
php mysql smarty
 
Topic Options
#279905 - 09/23/04 10:42 PM Finished-[6.3] Delete Users From Address Book Fix
Twisty Offline
Code Monkey

Registered: 09/26/03
Posts: 524
Mod Name / Version: Delete Users From Address Book Fix <br /> <br />Description: This is a fix which will allow you to delete users from your address book when selecting them from the drop-down menu and clicking the delete button on the sendprivate.php page. <br /> <br />Working Under: UBB.Threads 6.3 <br /> <br />Mod Status: Finished <br /> <br />Any pre-requisites: <br /> <br />Author(s): Twisty <br /> <br />Date: 09/23/04 <br /> <br />Credits: <br /> <br />Files Altered: sendmessage.php <br /> <br />New Files: <br /> <br />Database Altered: no <br /> <br />Info/Instructions: <br /> <br />In sendmessage.php... <br /> <br />CHANGE THIS: <br /> <br />
Code:
// ------------------------------------------------------ <br />// If they selected delete the name from the address book <br />   if ($textdelete) { <br />      if ($AddressBook != $ubbt_lang['CHOOSE_ADD']) { <br />         $Deleted    = addslashes($AddressBook); <br />         $query = " <br />            DELETE FROM {$config['tbprefix']}AddressBook <br />            WHERE  Add_Owner = '{$user['U_Number']}' <br />            AND    Add_Member = '$Deleted' <br />         "; <br />         $dbh -&gt; do_query($query); <br />      } <br />      header("Location: {$config['phpurl']}/sendprivate.php?Cat=$Cat&amp;PHPSESSID=$PHPSESSID"); <br />      exit(); <br />   }
<br /> <br />TO THIS: <br /> <br />
Code:
// ------------------------------------------------------ <br />// If they selected delete the name from the address book <br />   if ($textdelete) { <br />      if ($AddressBook != $ubbt_lang['CHOOSE_ADD']) { <br />         $Deleted    = addslashes($AddressBook); <br />         $query = " <br />            SELECT U_Number <br />            FROM   {$config['tbprefix']}Users <br />            WHERE  U_Username = '$Deleted' <br />         "; <br />            $sth = $dbh -&gt; do_query($query); <br />            list ($Deletednumber) = $dbh -&gt; fetch_array($sth); <br />            $dbh -&gt; finish_sth($sth); <br />         $query = " <br />            DELETE FROM {$config['tbprefix']}AddressBook <br />            WHERE  Add_Owner = '{$user['U_Number']}' <br />            AND    Add_Member = '$Deletednumber' <br />         "; <br />         $dbh -&gt; do_query($query); <br />      } <br />      header("Location: {$config['phpurl']}/sendprivate.php?Cat=$Cat&amp;PHPSESSID=$PHPSESSID"); <br />      exit(); <br />   }
<br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.

Top



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks